from multiprocessing import Process
import os


def info(title):
    print(title)
    print(f"module name is: {__name__}")
    print(f"parent process is: {os.getppid()}")
    print(f"process is: {os.getpid()}")


def f(name):
    info("function f")
    print(f"hello {name}")


if __name__ == "__main__":
    info("this is main process")
    process_list = []
    for i in range(10):
        p = Process(target=f, args=(i,))
        process_list.append(p)

    for p in process_list:
        p.start()

    for p in process_list:
        p.join()